﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Volo.Abp.ObjectMapping;

namespace Xms.Abp.ObjectMapping
{
    public interface IXmsObjectMapper: IObjectMapper
    {
        TDestination Map<TSource, TDestination>(object source);
        List<TDestination> Map<TSource, TDestination>(IEnumerable<TSource> source);
        TDestination MapTo<TDestination>(object source);
        List<TDestination> MapTo<TDestination>(System.Collections.IEnumerable source);
        IQueryable<TDestination> ProjectTo<TSource, TDestination>(IQueryable<TSource> source, params Expression<Func<TDestination, object>>[] membersToExpand);
        IQueryable<TDestination> ProjectTo<TDestination>(IQueryable source, object parameters, params Expression<Func<TDestination, object>>[] membersToExpand);
        IQueryable<TDestination> ProjectTo<TSource, TDestination>(IQueryable<TSource> source, IDictionary<string, object> parameters, params string[] membersToExpand);
        IQueryable ProjectTo(IQueryable source, Type destinationType);
        IQueryable ProjectTo(IQueryable source, Type destinationType, IDictionary<string, object> parameters, params string[] membersToExpand);
    }
    public interface IXmsObjectMapper<TContext>: IObjectMapper<TContext>, IXmsObjectMapper
    {

    }

    public interface IXmsObjectMapper<in TSource, TDestination>: IObjectMapper<TSource, TDestination>
    {
        TDestination Map(object source);
        List<TDestination> Map(IEnumerable<TSource> source);
        TDestination MapTo(object source);
        List<TDestination> MapTo(System.Collections.IEnumerable source);
        IQueryable<TDestination> ProjectTo(IQueryable<TSource> source);
        IQueryable<TDestination> ProjectTo(IQueryable source, object parameters, params Expression<Func<TDestination, object>>[] membersToExpand);
        IQueryable<TDestination> ProjectTo(IQueryable<TSource> source, IDictionary<string, object> parameters, params string[] membersToExpand);
    }
}
